import copy

# a = [1, 10000, [3, 4]]
# e = a
# b = copy.copy(a)
# b[0] = 100
# b[2] = [1,2]
# b[2].append(5)
# print(b,id(b),id(b[2]),id(e[0]))
# print(e,id(e),id(e[2]),id(e[0]))
# print(a,id(a),id(a[2]),id(e[0]))
# print(a[1] is b[1])

# c = [1,2,3]
# d = copy.copy(c)
# print(c,d,id(c),id(d))

a = (1,2,[1,2])
b =copy.deepcopy(a)
print(b,id(a),id(b))
print(a , b)

#
# a = 100111
# b = 100111
# c = 100111
# print(a == c)
# print(a is c)

# a = [100111,1]
# b = [100111,1]  # 换行定义
# print(a is b)  # 可能返回 False（取决于 Python 版本和环境）
#
# # 短字符串可能被缓存（ intern 机制）
# s1 = "hello"
# s2 = "hello"
# print(s1 is s2)  # True（共享缓存）
#
# s3 = "hello world!dddddddddddddddddddddddddddddddddddddddddddddd"
# s4 = "hello world!dddddddddddddddddddddddddddddddddddddddddddddd"
# print(s3 is s4)